In computer programs, a loop is a sequence of program statements which is specified once but which may be executed multiple times in succession. A first type of loop is a count-controlled loop, meaning a loop that is repeated for a specified number of times. One example of a count-controlled loop is a For-Next loop.
A second type of loop is a condition-controlled loop, meaning a loop that is repeated until some condition changes. An example of a condition-controlled loop is a Do-While loop. A third type of loop is a collection-controlled loop, meaning a loop that is repeated for all elements of an array or all members of a set. An example of a collection-controlled loop is a For Each loop.